<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="assetMenu" />
<meta name="nav" content="0" />
<c:if test="${typeId == '2' }"><title>设计单位</title></c:if>
<c:if test="${typeId == '3' }"><title>监理单位</title></c:if>
<c:if test="${typeId == '4' }"><title>施工单位</title></c:if>
<!--  通用情况下 不引入 js css  表单验证  js 放置到页面中 -->
<%-- ui tabs --%>

<link href="${ctx}/styles/lightness/jquery-ui-1.8.12.custom.css"
	rel="stylesheet" />
<script>
	$(document)
			.ready(
					function() {
						$("#checkDate").addClass("Wate").bind("click",
								function() {
									WdatePicker({
										skin : 'whyGreen',
										minDate : '#F{$dp.$D(\'finishDate\')}',
										maxDate : '%y-%M-%d',
										dateFmt : 'yyyy-MM-dd'
									});
								});
						$("#finishDate").addClass("Wate").bind("click",
								function() {
									WdatePicker({
										skin : 'whyGreen',
										maxDate : '%y-%M-%d',
										dateFmt : 'yyyy-MM-dd'
									});
								});
						$("#colBtn").click(function() {
							window.returnValue = true;
							window.close();
						});

						$("#inputForm")
								.validate(
										{
											rules : {
												orgName : {
													required : true,
													remote : "organization!checkOrgName.action?oldOrgName="
															+ encodeURI('${orgName}')
												},
												principal:"required",
												orgTelephone:"required",
												orgAddress:"required",
												email : {
													required : true,
													email : true
												},
												orgNum : {
													maxlength : 15
												},
												postCode : {
													digits : true,
													maxlength : 8,
													minlength : 6
												}
											},
											messages : {
												orgName : {
													required : "请输入单位名称！",
													remote : "单位名称已存在！"
												},
												email : {
													email : "请输入正确格式的Email!"
												},
												orgNum : {
													maxlength : "不得超过15个字符！",
												},
												postCode : {
													digits : "必须输入纯数字！",
													maxlength : "不得超过8个字符",
													minlength : "不得少于6个字符"
												}
											}
										});

					});
</script>
</head>
<body>
<form action="${ctx}/project/org/organization!save.action" method="post"
	id="inputForm" class='yform'>
<div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all ui-sortable">
	<li><a id="build" class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active" href="#">单位信息</a></li>
	<c:if test="${fn:length(id)!=0}">
		<li><a class="ui-state-default ui-corner-top"
			href="${ctx}/project/org/qualification.action?organizationId=${id}&projectId=${projectId}&typeId=${typeId}&deptId=${deptId}&decorator=${param.decorator}&confirm=${param.confirm}&signid=${signid}">单位资质</a></li>
		<c:if test="${null!=projectId}">
			<li><a class="ui-state-default ui-corner-top " href="${ctx}/project/sign/org/department.action?deptId=${deptId}&projectId=${projectId}&typeId=${typeId}&organizationId=${id}&decorator=${param.decorator}&confirm=${param.confirm}&signid=${signid}">部门设置</a></li>
			<li><a class="ui-state-default ui-corner-top " href="${ctx}/project/sign/org/userdepartment.action?organizationId=${id}&projectId=${projectId}&typeId=${typeId}&deptId=${deptId}&decorator=${param.decorator}&confirm=${param.confirm}&signid=${signid}">人员情况</a></li>
			</c:if>
	</c:if>
</ul>
<table id="contentTable">
	<tr>
		<td>单位名称：</td>
		<td><input id="orgName" name="orgName" type="text"
			value="${orgName}" /> <input id="id" name="id" type="hidden"
			value="${id}" /> <input type="hidden" name="projectId"
			value="${projectId}" /> <input type="hidden" name="deptId"
			value="${deptId}" /> <input type="hidden" name="typeId"
			value="${typeId}" /></td>
		<td>单位性质：</td>
		<td><pt:code category="3005" toScope="request" name="orgFormSet"></pt:code>
		<s:select list="#request.orgFormSet" name="orgForm" listKey="value"
			listValue="label"></s:select></td>
	</tr>

	<tr>
		<td>主管部门：</td>
		<td><input name="burderDep" type="text" value="${burderDep }" /></td>
		<td>单位职能：</td>
		<td><input id="functionsOrg" name="functionsOrg" type="text"
			value="${functionsOrg}" /></td>
	</tr>
	<tr>
		<td>负责人:</td>
		<td><input name="principal" type="text" value="${principal}" />
		</td>
		<td>邮政编码：</td>
		<td><input name="postCode" type="text" value="${postCode}" /></td>
	</tr>
	<tr>
		<td>单位电话：</td>
		<td><input id="orgTelephone" name="orgTelephone" type="text"
			value="${orgTelephone}"></input></td>
		<td>传真：</td>
		<td><input id="portraiture" name="portraiture" type="text"
			value="${portraiture}" /></td>
	</tr>
	<tr>
		<td>级别：</td>
		<td><input name="orgLevel" type="text" value="${orgLevel }" /></td>
		<td>电子邮箱：</td>
		<td><input id="orgLevel" name="email" type="text"
			value="${email}" /></td>
	</tr>
	<tr>

		<td>行政级别：</td>
		<td><input id="politicsLevel" name="politicsLevel" type="text"
			value="${politicsLevel}" /></td>
		<td>机构代码证：</td>
		<td><input id="orgNum" name="orgNum" type="text"
			value="${orgNum}" /></td>
	</tr>
	<tr>

		<td>成立时间：</td>
		<td><input id="finishDate" readonly="readonly" name="finishDate"
			value="${finishDate}" /></td>
		<td>考核时间：</td>
		<td><input id="checkDate" readonly="readonly" name="checkDate"
			value="${checkDate}" /></td>
	</tr>
	<tr>
		<td>经费来源：</td>
		<td><input id="moneySource" name="moneySource" type="text"
			value="${moneySource}" /></td>
		<td>单位地址：</td>
		<td><input name="orgAddress" value="${orgAddress}" /></td>
	</tr>
	<tr>

		<td>单位主页：</td>
		<td><input id="orgHome" name="orgHome" type="text"
			value="${orgHome}" /></td>
		<td>基本简况：</td>
		<td><input name="basicInfo" value="${basicInfo}" /></td>
	</tr>
	<tr>

		<td>备注：</td>
		<td colspan="3"><textarea id="remark" name="remark">${remark}</textarea></td>
	</tr>
</table>
</div>
<div class="type-button"><input type="submit" class="submit"
	value="提交" /> <c:if test="${fn:length(param.decorator)==0}">
	<input id="colBtn" type="button" value="关闭" class="reset" />
</c:if></div>
</form>
</body>
</html>
